---
title: fix
---

import { Badge } from "@astrojs/starlight/components";
import ConfigOption from "@partials/option/config.mdx";
import DependenciesOption from "@partials/option/dependencies.mdx";
import DependencyTypesOption from "@partials/option/dependency-types.mdx";
import HelpOption from "@partials/option/help.mdx";
import LogLevelsOption from "@partials/option/log-levels.mdx";
import NoAnsiOption from "@partials/option/no-ansi.mdx";
import ShowOption from "@partials/option/show-versions.mdx";
import SortOption from "@partials/option/sort.mdx";
import SourceOption from "@partials/option/source.mdx";
import SpecifierTypesOption from "@partials/option/specifier-types.mdx";

import QuoteFilters from "@partials/tips/quote-filters.mdx";

Fix every autofixable issue found by `syncpack lint`.

## Examples

```bash
# Only fix issues in dependencies and devDependencies
syncpack fix --dependency-types prod,dev
# Only fix inconsistencies with exact versions (eg "1.2.3")
syncpack fix --specifier-types exact
# Only fix issues in "react" specifically
syncpack fix --dependencies react
# See more examples
syncpack fix --help
# See a short summary of options
syncpack fix -h
```

## Options

<QuoteFilters />

### --config <Badge text="<file-path>" />

<ConfigOption command="fix" />

### --dependencies <Badge text="<dependency-name-pattern>" />

<DependenciesOption command="fix" />

### --dependency-types <Badge text="<comma-separated-dependency-type-names>" />

<DependencyTypesOption command="fix" />

### --log-levels <Badge text="<comma-separated-log-level-names>" />

<LogLevelsOption command="fix" />

### --no-ansi

<NoAnsiOption command="fix" />

### --show <Badge text="<comma-separated-detail-names>" />

<ShowOption command="fix" />

### --sort <Badge text="<choice>" />

<SortOption command="fix" />

### --source <Badge text="<file-pattern>" />

<SourceOption command="fix" />

### --specifier-types <Badge text="<comma-separated-specifier-type-names>" />

<SpecifierTypesOption command="fix" />

### --help

<HelpOption command="fix" />
